<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddIndexSnappedTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snapped', function (Blueprint $table) {
            //

            $table->unique('goods_id');

        });


        Schema::table('snapped_sku', function (Blueprint $table) {
            //

            $table->unique('sku_id');
        });


    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snapped', function (Blueprint $table) {
            //

            $table->dropColumn('goods_id');

        });

        Schema::table('snapped_sku', function (Blueprint $table) {
            //



            $table->dropColumn('sku_id');
        });

    }
}
